﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.System
{
    /// <summary>
    /// 用户角色关联表实体类
    /// </summary>
    public class UserRole
    {
        /// <summary>
        /// 关联ID（主键，自增）
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 用户ID（外键，关联DemoUser表）
        /// </summary>
        [Required]
        public int UserId { get; set; }

        /// <summary>
        /// 角色ID（外键，关联DemoRole表）
        /// </summary>
        [Required]
        public int RoleId { get; set; }
    }
}
